var redirectUrl = $('#redirectUrl').val();

$('.Disagree').on('tap',function(){
	var w=$(window).width();
	dialog('Friendly Reminder', ' Please agree to the Terms & Conditions (Revised) & Privacy Policy (Revised) of Market Place by Jasons to proceed to do online shopping at Market Place by Jasons online shopping site. Simply click "Go Back to Agree" below and click "Agree" on the previous page to proceed. <br/><br/>If you disagree, please click "Cancel" below to go to the homepage of Market Place by Jasons online shopping site. ', 3);
    var $dialog = $('#dialog');
    $dialog.show();
    $('#giveBtn').html('Cancel');
    $('#comfirmBtn').html('Go Back to Agree');
    $('.weui_dialog_ft').addClass('setWidth');
    $('.setWidth .comfirmBtn').addClass('mui-pull-left');
    $('.weui_dialog_bd').css('text-align','left');
    if(w<375){
	    $('.weui_dialog_ft a').css({'padding':'0 8px','margin':'0 5px'});
    }else{
	    $('.weui_dialog_ft a').css({'padding':'0 30px','margin':'0 6px'});
    }
    $dialog.find('#comfirmBtn').one('click', function() {
        $dialog.hide();
        $dialog.remove();
    	$('.hasLogin').addClass('on');
    });
	$dialog.find('#giveBtn').one('click', function() {
        location.href=MPJ.base+"/pages/login.jsp";
	});
    
        
})

$('.Agree').on('tap',function(){
    location.href=MPJ.base+"/pages/register/register.jsp?redirectUrl="+redirectUrl;
})


$('.goMarketPlaceByJasons').on('tap',function(){
    location.href="http://www.marketplacebyjasons.com";
})
$('.gLegalNotice').on('tap',function(){
    location.href="https://www.marketplacebyjasons.com/mpjshop/en/html/customer-service/legal-notice.html";
})
$('.goPrivacyPolicy').on('tap',function(){
    location.href="https://www.marketplacebyjasons.com/mpjshop/en/html/customer-service/privacy-policy.html";
})
$('.goEmaile').on('tap',function(){
    location.href="mailto:mpjservice@dairy-farm.com.hk";
})
//$('.goMarketPlaceByJasons').on('tap',function(){
//    location.href="http://www.marketplacebyjasons.com/";
//})